<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // defineProperty 可修改和添加对象属性，添加到属性不可枚举
        const person = { name: "Lydia" };
        Object.defineProperty(person, "age", { value: 21 });

        console.log(person);
        console.log(Object.keys(person));

    </script>
</body>

</html>